#ifndef SURFACE_H
#define SURFACE_H

#include "ISurface.h"
#include "Object3D.h"

namespace RayTracer
{
    class Surface : public Object3D, public ISurface
    {
    private:
	Material *material;
	float ComputeDot(const Vector3D *surfaceNormal, const Vector3D *lightDir) const;
	float ComputePhongDot(const Vector3D *surfaceNormal, const Vector3D *lightDir, const Vector3D *viewOrigin, const Vector3D *hitPoint) const;

    public:
	Surface(Vector3D pos, Vector3D dir);
	~Surface();
	virtual Vector3D Normal(const Vector3D *point) const = 0;
	virtual Vector3D GetPosition() const;
	virtual HitInfo Hit(const Ray3D *ray, float tMin, float tMax) const = 0;
	
	virtual Color GetColor(const Light3D *light, const Vector3D *point) const;
	virtual Material *GetMaterial() const;
	virtual void SetMaterial(Material *value);
    };
};
#endif
